{% extends 'base_user_center.html' %}
{% load staticfiles %}

<!--<div class="main_con clearfix">-->
{% block right_content %}
	<div class="right_content clearfix">
		<div class="info_con clearfix">
			<h3 class="common_title2">基本信息</h3>
				<ul class="user_info_list">
					<li><span>用户名：</span>{{ user.username }}</li>
					{% if address %}
						<li><span>联系方式：</span>{{ address.phone }}</li>
						<li><span>联系地址：</span>{{ address.addr }}</li>
					{% else %}
						<li><span>联系方式：</span>无默认</li>
						<li><span>联系地址：</span>无默认</li>
					{% endif %}
				</ul>
		</div>

		<h3 class="common_title2">最近浏览</h3>
		<div class="has_view_list">
			<ul class="goods_type_list clearfix">
				{% for goods in goods_li %}
				<li>
					<!-- goods.image.url代表调用storage.py文件中的url方法，返回
					 http://192.168.1.103:8888/group1/M00/00/00/wKgBZ12vxS-AIwi1AAAy1Tlm9So3169261-->
					<a href="{% url 'goods:detail' goods.id %}"><img src="{{ goods.image.url }}"></a>
					<h4><a href="detail.html">{{ goods.name }}</a></h4>
					<div class="operate">
						<span class="prize">￥{{ goods.price }}</span>
						<span class="unit">{{ goods.price }}/{{ goods.unite }}g</span>
						<a href="#" class="add_goods" title="加入购物车"></a>
					</div>
				</li>
				{% empty %}
					无历史浏览记录
				{% endfor %}
			</ul>
		</div>
	</div>
{% endblock right_content %}
